package com.ukao.steward.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;


import com.ukao.steward.R;
import com.ukao.steward.base.ListBaseAdapter;
import com.ukao.steward.base.SuperViewHolder;
import com.ukao.steward.bean.AddClothingItem;
import com.ukao.steward.bean.IncomeDetailbBean;
import com.ukao.steward.util.CheckUtils;

import java.util.List;

/**
 * Created by ukaodev on 2017/6/14.
 */

public class AddClothingAdapter extends ListBaseAdapter<AddClothingItem> {

private  boolean isSearchEnter;



    public AddClothingAdapter(Context context, List<AddClothingItem> datas  ) {
        super(context, datas);

    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_addclothing_list_item;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        TextView mTextView=holder.getView(R.id.activity_addclothing_list_item_tv);
        AddClothingItem item = getItem(position);
        mTextView.setText(item.getName());
        ImageView hook=holder.<ImageView>getView(R.id.hook);
            if (item.isCheck()){
          //     hook.setVisibility(View.VISIBLE);
                mTextView.setBackgroundResource(R.drawable.shape_add_clothing_blue);
                mTextView.setTextColor(mContext.getResources().getColor(R.color.white));
            }else{
           //     hook.setVisibility(View.INVISIBLE);
                mTextView.setBackgroundResource(R.drawable.shape_add_clothing_gray);
                mTextView.setTextColor(mContext.getResources().getColor(R.color.black));
            }


    }










}
